﻿@model Orchard.ContentTypes.ViewModels.EditTypeViewModel

@using Orchard.Core.Contents.Settings;

@{
    var settings = Model.Settings.GetModel<ContentTypeSettings>();
    var stereotype = Model.Settings.ContainsKey("Stereotype") ? Model.Settings["Stereotype"] : "";
}

<div class="summary">
    <div class="properties">
        <h3>@Model.DisplayName</h3>
        @if (!string.IsNullOrWhiteSpace(stereotype)) { <text><span class="stereotype" title="Stereotype">- @stereotype</span></text> }
        @if (!Model.DisplayName.Equals(Model.Name, StringComparison.OrdinalIgnoreCase)) { <text><span class="hint" title="@T("Technical name")">@T("Content Type name: {0}", Model.Name)</span></text> }

        @if (settings.Creatable) {
            <p class="pageStatus">@Html.ActionLink(T("Create New {0}", Html.Raw(Model.DisplayName)).Text, "Create", new {area = "Contents", id = Model.Name})</p>
        }
    </div>
    <div class="related">
        <ul class="action-links">
            @if (settings.Listable) {
                <li class="action-link">
                    @Html.ActionLink(T("List Items").Text, "List", new { area = "Contents", id = Model.Name })
                </li>
            }
            <li class="action-link">
                @Html.ActionLink(T("Edit").ToString(), "Edit", new { area = "Orchard.ContentTypes", id = Model.Name })
            </li>
        </ul>
    </div>
</div>